<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.zmht.specedu.vo.*,com.zmht.specedu.frame.model.PageInfoModel,com.zmht.specedu.frame.util.ConstantsVars"%>
<%@page import="com.zmht.specedu.frame.model.PageInfoModel,com.zmht.specedu.senate.web.form.TeacherForm"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<%
	/**
	 * @author 张天兴
	 * @since 2009/05/08
	 */

 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>聋校备课与语言学习及矫治系统</title>
<fmt:setBundle basename="PathResource" scope="session" />
<link href="<%=request.getContextPath() %>/<fmt:message key='StylePath' />style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath() %>/<fmt:message key='jquery' />ajaxHelper.js"></script>
<script type="text/javascript">
                   
          function query()
          {
          
           document.forms[0].submit();
          }
                   
           function checkZero()
          {
          var pageSize=document.forms[0].pageSize.value;
          if (pageSize==0)
           alert("对不起，你输入的页码错误！请重新输入！");
           return false;
          }          
        </script>
</head>

<body class="bcolor">
<html:form  method="post" action="teacherAction.do?method=lookUp">
  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#a7c8e6">
    <tr>
      <td><table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" class="fontbot">
        <tr>
          <td width="10%" align="right" valign="middle" bgcolor="#FFFFFF">教师姓名：</td>
          <td width="15%" valign="middle" bgcolor="#FFFFFF">
          <html:text property="tname" styleClass="boxcopy2" style="width:100px;" />
          </td>
          <td width="10%" align="right" valign="middle" bgcolor="#FFFFFF">责任类别：</td>
          <td width="15%" valign="middle" bgcolor="#FFFFFF">
            <select name="zeRenType" class="boxcopy2"  style="width:100px;">
				<option>所有</option>
				<%
				Map<String,String> mapping = Teacher.dutyMapping;
				TeacherForm teacherForm = (TeacherForm)request.getAttribute("teacherForm");
				for(String s : mapping.keySet()){
			%>
				<option value="<%=s %>" <%if(teacherForm.getZeRenType()!=null && teacherForm.getZeRenType().equals(s)){out.print("selected");} %> ><%=mapping.get(s) %></option>
			<%
				}
			%>
            </select>
                    </td>
          <td width="50%" valign="middle" bgcolor="#FFFFFF"><a href="javascript:query()" onfocus="this.blur()"><img src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />gif-03.gif" width="53" height="22" border="0" /></a></td>
        </tr>
      </table></td>
    </tr>
  </table>
  <table cellspacing="0" cellpadding="0" width="99%" align="center" border="0">
    <tbody>
      <tr>
        <td width="7"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_01.gif"   width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_05.gif"><table cellspacing="0" cellpadding="0" width="100%" border="0">
            <tbody>
              <tr>
                <td width="30"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_02.gif"    width="30" /></td>
                <td align="left" width="200"   background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_03.gif">&nbsp;<b>教 师 浏 览</b></td>
                <td width="59"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_04.gif"   width="59" /></td>
                <td>&nbsp;</td>
              </tr>
            </tbody>
        </table></td>
        <td width="8"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_06.gif" 
      width="8" /></td>
      </tr>
      <tr>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_07.gif"><img height="1" 
      src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
        <td bgcolor="#f7fbff"><table cellspacing="1" bordercolordark="#ccccff" cellpadding="3" width="100%" 
      bgcolor="#cfe5f5" bordercolorlight="#ffffff" border="0">
            <tbody>
              <tr bgcolor="#a4c9ec">
                <td width="20" align="center">&nbsp;</td>
                <td align="center"><b>教师姓名</b></td>
                <td align="center"><strong>性 别</strong></td>
                <td align="center"><b>职 称</b></td>
                <td align="center"><b>分工类别</b></td>
                <td align="center"><strong>责任类别</strong></td>
                <td align="center"><strong>浏 览</strong></td>

                
              </tr>
                <%
                	PageInfoModel model = (PageInfoModel)request.getAttribute(ConstantsVars.PAGINATION_MODEL_KEY);
                	List<Teacher> items = model.getResultItems();
                	if(items!=null){
                		for(int x=0;x<items.size();x++){
                %>
					<tr bgcolor="#ffffff">
						<td align="center"><%=x+1%>.</td>
                		<td align="center" width="15%"><%=items.get(x).getTname() %></td>
                		<td align="center" width="10%"><%=items.get(x).getSex() %></td>
                		<td align="center"><%=items.get(x).getPosition() %></td>
                		<td align="center"><%=items.get(x).getFengongtypes().getName() %></td>
                		<td align="center"><%=mapping.get(items.get(x).getZeRenType()) %></td>
                		<td height="20" align="center" bgcolor="#FFFFFF">
							<img src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />yulan.gif" style="cursor:pointer;" width="20" height="20" border="0" onclick="openWindow('teacherAction.do?method=look&teacherId=<%=items.get(x).getTeacherId() %>',650,430,true,'教师浏览');" /></td>
					</tr>
				<%
                		}
                	}
				%>
             
            </tbody>
          </table>
          

        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
          <tr>
            <td bgcolor="#e6f0f8">
            <jsp:include page="../../common/pagination.jsp"></jsp:include>
            </td>
          </tr>
        </table>
          </td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_09.gif"><img height="1"  src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
      </tr>
      <tr>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_10.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_11.gif">&nbsp;</td>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_12.gif"  width="8" /></td>
      </tr>
    </tbody>
  </table>
</html:form>
</body>
</html>
 